package com.jkoss.biz.imp.zx;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import com.jkoss.biz.zx.zxbiz;
import com.jkoss.dao.zx.ConsultationMapper;
import com.jkoss.pojo.zx.Consultation;
import com.jkoss.tool.Page;

@Component
public class zxbizimp implements zxbiz{

	@Autowired
	private ConsultationMapper zxdao;
	@Override
	public List<Consultation> Showzxxueyuan(Page<Consultation> page) {
		// TODO Auto-generated method stub
		return zxdao.findByAll(page);
	}
	@Override
	public int addConsultation(Consultation consultation) {
		// TODO Auto-generated method stub
		return zxdao.insert(consultation);
	}
	@Override
	public Consultation findzxByOne(String zstuid) {
		int id = Integer.parseInt(zstuid);
		return zxdao.selectByPrimaryKey(id);
	}
	@Override
	public int upzx(Consultation consultation) {
		// TODO Auto-generated method stub
		return zxdao.updateByPrimaryKey(consultation);
	}
	@Override
	public int delzx(Integer zstuid) {
		// TODO Auto-generated method stub
		return zxdao.deleteByPrimaryKey(zstuid);
	}

}
